<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>搜事网-舆情预警</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
<script>
	// wait for the DOM to be loaded     
	$(document).ready(function() {
		$('#myForm').ajaxForm(function() {
			//alert("Thank you for your comment!");
		});
	});
</script>
<!-- 引用文件:start-->
<jsp:include page="includes.jsp" />
<%@ page language="java" contentType="text/html;charset=UTF-8"
	import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!-- 引用文件:end-->
</head>
<body>
	<div class="wrap">
		<!-- header:start -->
		<jsp:include page="banner.jsp" />
		<!-- header:end -->
		<div id="body">
			<div id="left" class="wrap">
				<div class="main lside176">
					<jsp:include page="left_banner.jsp" />
					<div class="middle w804">
						<div id="left" class="w804">
							<div class="main">

								<div class="tabContent">
									<div class="listForm">
										<form name="delForm" method="post" action="deleteWarn.do">
											<!-- <button class="btn modify" type="submit"
												onclick="document.getElementById('dialog').style.display='block'">新建</button>
											 -->
											<button class="btn modify" type="button" onclick="newWarn()">新建</button>
											<button name="delselect" class="btn delete" type="submit"
												onclick="document.delForm.submit()">删除</button>
											<s:if test="warns.size > 0">
												<table class="t" width="100%" cellspacing="1">
													<tr class="odd">
														<td></td>
														<td>序号</td>
														<td>舆情主题</td>
														<td>用户</td>
														<td>预警方式</td>
														<td>预警主题</td>
														<td>预警需舆情条数</td>
													</tr>
													<s:iterator value="warns">
														<tr>
															<td><input type="checkbox" name="delIds"
																value="${id}" /></td>
															<!--<s:checkbox name="delIds" value="id"></s:checkbox> -->
															<td><s:property value="id" /></td>
															<td><s:property value="topic.name" /></td>
															<td><s:property value="user.name" /></td>
															<td>type, no this column</td>
															<td><s:property value="name" /></td>
															<td>100,no this column</td>
														</tr>
													</s:iterator>
												</table>
											</s:if>
										</form>
										
										<!-- 分页:start -->
										<div class="pagination">
											<s:if test="curPage!=1">
												<a href="listWarn.do?curPage=1&pageSize=${pageSize}">首页</a>
												<a
													href="listWarn.do?curPage=${curPage-1}&pageSize=${pageSize}">上一页</a>
											</s:if>
											<s:if test="curPage!=totalPage">
												<a
													href="listWarn.do?curPage=${curPage+1}&pageSize=${pageSize}">下一页</a>
												<a
													href="listWarn.do?curPage=${totalPage}&pageSize=${pageSize}">末页</a>
											</s:if>
											当前
											<s:property value="curPage" />
											/
											<s:property value="totalPage" />
											页
										</div>
										<!-- 分页:end -->
										
										<script>
											function newWarn() {
												document
														.getElementById("myForm").style.display = "block";
											}
											function saveWarn() {
												document.getElementById(
														'myForm').submit();
											}
										</script>

										<form id="myForm" action="saveWarn.do" method="post"
											style="display: none">
											<table>
											<tr><td>预警名称</td><td><input type="text" name="name" /></td></tr>
											<tr><td>用户ID</td><td><input type="text" name="userId" /></td></tr>
											<tr><td>话题ID</td><td><input type="text" name="topicId" /></td></tr>
											<tr><td></td><td><input	type="button" onclick="saveWarn()" value="保存" /></td></tr>
											</table>
										</form>

									</div>
								</div>
							</div>
						</div>
					</div>
						<jsp:include page="footer.jsp" />
					
					<div class="clear"></div>
				</div>
			</div>
		</div>
	</div>

	<div class="dialogLayer" id="dialog" style='display: none'>
		<div class="mask">
			<iframe frameborder="0" width="100%" height="100%"
				src="../transparent.html" allowtransparency="true"></iframe>
		</div>
		<div class="pos1" style="width: 600px;">
			<div class="pos2">
				<div class="dialog">
					<a class="close" href="javascript:void(0)"
						onclick="var P='parentNode'; this[P][P][P][P].style.display='none'"></a>
					<form action="#" enctype="application/x-www-form-urlencoded"
						method="post">
						<h1>新建舆情预警</h1>

						<div>
							<table class="infoTable" width="100%" cellspacing="1">
								<tr>
									<td class="h">是否告警</td>
									<td><label><span class="select"> <select
												name="">
													<option value="">是</option>
													<option value="">否</option>
											</select>
										</span> </label></td>
									<td class="h">告警需舆情条数</td>
									<td><label><span class="inputtxt"> <input
												type="text" name="" value="23" />
										</span></label></td>
								</tr>
								<tr>
									<td class="h">告警类型</td>
									<td><label><span class="select"> <select
												name="">
													<option value="">邮件</option>
													<option value="">短信</option>
											</select>
										</span> </label></td>
									<td class="h">告警标题</td>
									<td><label><span class="inputtxt"> <input
												type="text" name="" value="" />
										</span></label></td>
								</tr>

							</table>
							<hr />
							<p>
								<button class="btn" type="submit">确认</button>
								&emsp;
								<button class="btn" type="button"
									onclick="document.getElementById('dialog').style.display='none'">取消</button>
							</p>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>


</body>
</html>
